package systemInterface;

import java.nio.file.Path;

import javax.swing.JFileChooser;

import umg.os.kernel.Kernel;
import umg.os.kernel.scheduler.ReadyList;
import umg.os.kernel.scheduler.RoundRobin;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		JFileChooser jfc  = new JFileChooser("Select the directory of the .proc files");
		jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
		jfc.showOpenDialog(null);
		Path procFilesDirectory = null;
		if (jfc.getSelectedFile() != null) {
			procFilesDirectory = jfc.getSelectedFile().toPath();
		} else {
			return;
		}
		Kernel.initKernelUsing(new RoundRobin((short) 5));
		ReadyList.loadProgram(procFilesDirectory);
		Kernel.startSimulation();
	}

}
